'use strict';
module.exports = {
	/**
	 * 用于公众号获取用户信息，不能删除
	 */
	main: async (event) => {
		let { data = {}, userInfo, util, filterResponse, originalParam } = event;
		let { customUtil, uniID, config, pubFun, vk, db, _ } = util;
		let { uid, openid } = data;
		let res = { code: 0, msg: "" };
		// 业务逻辑开始-----------------------------------------------------------
		res.user = await db.collection('uni-id-users').where({
			wxh5_openid: openid
		}).get()
		console.log('user=', res.user);
		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
